<html>
<hedd>
    <style>
        .xwtable {
            width: 100%;
            border-collapse: collapse;
            border: 1px solid #ccc;
        }
        .xwtable td {
            font-size: 12px;
            color: #333333;
            text-align: center;
            background: url(table_top.jpg) repeat-x top center;
            border: 1px solid #ccc;
            font-weight: bold;
        }
        .xwtable tr {
            background: #fff;
            font-size: 12px;
            color: #666666;
        }
        .xwtable tr.alt-row {
            background: #f2f7fc;
        }
        .xwtable th {
            line-height: 20px;

            padding: 4px 10px 3px 10px;
            height: 18px;
            border: 1px solid #ccc;
        }
        .xwtable td {
            line-height: 20px;
            text-align: left;
            padding: 4px 10px 3px 10px;
            height: 18px;
            border: 1px solid #ccc;
        }
        .xwtable td {
            text-align: center;
        }
        .xwtable td input {
            text-align: center;
            padding-left:10px
        }
        #xiugai {
            text-align: center;
            margin-top: 30px;
        }
        #xiugai input{
            border: 1px solid #2480c2;
            box-shadow:inset 0px 1px 0px 0px rgba(255, 255, 255, 0.5);
            background:linear-gradient(#54b3ff, #0078d9);
            padding: 5px 30px;
            color: #fff;

        }

    </style>
</hedd>
<body>
<div>
    <form method="post" action="">
        {% csrf_token %}
        <table class="xwtable">
            <tr class="alt-row">
                <th>课程</th>
                <th>出勤率</th>
                <th>学习态度</th>
                <th>作业</th>
                <th>小测验</th>
                <th>单元考试</th>
                <th>期中考试</th>
                <th>期末考试</th>
            </tr>
            {% for i in list %}
                <tr class="listtr">
                    <td>{{ i.kecheng }}<input name="kecheng{{ i.id }}" type="hidden" max=100 min="0"
                                              value={{ i.kecheng }}></td>
                    <input type="hidden" name="{{ forloop.counter }}" value={{ i.id }}>
                    <td><input name="chuqin{{ forloop.counter }}" type="number" max=100 min="0" value={{ i.chuqin }}>
                    </td>
                    <td><input name="taidu{{ forloop.counter }}" type="number" max=100 min="0" value={{ i.taidu }}></td>
                    <td><input name="zuoye{{ forloop.counter }}" type="number" max=100 min="0" value={{ i.zuoye }}></td>
                    <td><input name="ceyan{{ forloop.counter }}" type="number" max=100 min="0" value={{ i.ceyan }}></td>
                    <td><input name="danyuan{{ forloop.counter }}" type="number" max=100 min="0" value={{ i.danyuan }}>
                    </td>
                    <td><input name="qizhong{{ forloop.counter }}" type="number" max=100 min="0" value={{ i.qizhong }}>
                    </td>
                    <td><input name="qimo{{ forloop.counter }}" type="number" max=100 min="0" value={{ i.qimo }}></td>
                </tr>
            {% endfor %}
        </table>
        <div id="xiugai"><input type="submit" value="修改"></div>
    </form>
</div>
<script>

</script>
</body>
</html>